//
//  LGDrawingBoardView.swift
//  swiftLingo
//
//  Created by lingo on 2017/12/5.
//  Copyright © 2017年 livefor. All rights reserved.
//

import UIKit

class LGDrawingBoardView: UIView {
 
    //override func draw(_ rect: CGRect) {
//        let ctx = UIGraphicsGetCurrentContext()
//        let rect = CGRect.init(x: 10, y: 10, width: 100, height: 100)
//        ctx?.addEllipse(in: rect)
//        ctx?.setFillColor(UIColor.red.cgColor)
       // ctx?.setStrokeColor(UIColor.blue.cgColor)
        //ctx?.setLineWidth(5)
     //   ctx?.fillPath()
        //ctx?.strokePath()
//        let point = CGPoint.init(x: 10, y: 100)
//        let point2 = CGPoint.init(x: 200, y: 200)
//        ctx?.move(to: point)
//        ctx?.addLine(to: point2)
//        ctx?.closePath()
//        ctx?.fillPath()
   // }
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        let touch : UITouch = (touches as NSSet).anyObject() as! UITouch
        let p = touch.location(in: self)
        LGLog(p)
    }
    override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
        LGLog("------\(touches.count)")
    }

}
